﻿Imports CustomTshirtFinal

Public Class UsuarioNuevo
    Inherits System.Web.UI.Page

    Protected Sub btnGuardar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnGuardar.Click

        Try
            Dim negocio = New UsuarioNegocio
            negocio.insertar(Me.txtNombre.Text, Me.txtApellido.Text, Me.txtTelefono.Text, Me.txtCorreo.Text, Me.txtSexo.Text, Me.txtPassword.Text)

            Me.txtNombre.Text = ""
            Me.txtApellido.Text = ""
            Me.txtTelefono.Text = ""
            Me.txtCorreo.Text = ""
            Me.txtSexo.Text = ""
            Me.txtPassword.Text = ""
            Response.Write("Se insertó correctamente")

        Catch ex As Exception
            Response.Write("Problemas al insertar")
        End Try

    End Sub

    Protected Sub btnRegresar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnRegresar.Click
        Response.Redirect("Usuarios.aspx", True)
    End Sub

End Class